package Ldzy.Tabel.com;

import Ldzy.bean.com.User;

import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.security.PublicKey;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

public class UserDB {
    private  static Map<String, User> users=new LinkedHashMap<String,User>();
    static {
        users.put("张三1",new User("张三1","123"));
        users.put("张三2",new User("张三2","123"));
        users.put("张三3",new User("张三3","123"));
        users.put("张三4",new User("张三4","123"));
        users.put("1",new User("1","1"));
    }
    public static Collection<User> getAllUser(){
        return  users.values();
    }
    public static User getUserByName(String name){
        return  users.get(name);
    }

}
